import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { processWorkOrderForm, processWorkOrderList } from '@/api/processWorkOrder/types';

/**
 * 查询工序工单列表
 * @param query
 * @returns {*}
 */

export const getProcessWorkOrderList = (query?: processWorkOrderForm): AxiosPromise<processWorkOrderList[]> => {
  return request({
    url: '/painting/sapOrder/list',
    method: 'get',
    params: query
  });
};

/**
 * 开工
 * @param data
 */

export const startWork = (data?: processWorkOrderForm) => {
  return request({
    url: '/painting/sapOrder/list',
    method: 'post',
    data
  });
};


/**
 * 异常上报
 * @param data
 */

export const AbnormalReporting = (data?: processWorkOrderForm) => {
  return request({
    url: '/painting/sapOrder/list',
    method: 'post',
    data
  });
};